<?php

class Application_Form_Cadastrar extends Zend_Form {
	
	public function init() {
		// definicoes basicas do form
		$this->setName ( 'cadastrar' );
		$this->setAction ( '/meus-dados/cadastrar' );
		$this->setMethod ( 'post' );
		$this->setAttrib ( 'enctype', 'multipart/form-data' );
		$this->setAttrib ( 'id', 'form-cadastrar' );
		
		// elementos do form
		$nome = new Zend_Form_Element_Text ( "nome" );
		$nome->setLabel ( "Nome:" )
		->setAttrib ( "class", "inp-form" )
		->setRequired(TRUE);
		
		$email = new Zend_Form_Element_Text ( "email" );
		$email->setLabel ( "E-mail:" )->setAttrib ( "class", "inp-form" )->setRequired(TRUE);
		
		$endereco = new Zend_Form_Element_Textarea ( "endereco" );
		$endereco
			->setLabel ( "Endereco:" )
			->setAttrib("rows", "05")
			->setAttrib("cols", "20")
			->setAttrib ( "class", "inp-form" )
			->setRequired(TRUE);
		
		$senha = new Zend_Form_Element_Password ( "senha" );
		$senha->setLabel ( "Senha:" )->setAttrib ( "class", "inp-form" )->setRequired(TRUE);
		
		$submit = new Zend_Form_Element_Submit ( "submit" );
		$submit->setLabel ( "Cadastrar" );
		
		$this->addElements ( array ($nome, $endereco, $email, $senha, $submit ) );
	}

}

